package com.ywk.base.designPattern.template;

import java.util.Calendar;

/**
 * 模板模式：使得类可以不改变一个算法的结构即可重定义该算法的某些特定步骤。
 *
 * @Author zbh
 * @Date 2023/4/5
 */
public class TemplateTest {
    public static void main(String[] args) {
        Game game = new Cricket();
        game.play();
        System.out.println("=====================================");
        game = new Football();
        game.play();
        Calendar quarterCalendar=Calendar.getInstance();
        quarterCalendar.set(Calendar.MONTH, 12);
        System.out.println(quarterCalendar.getTime());
    }
}
